Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## rdlc.main
Class Main

    java.lang.Object
      rdlc.main.Main

    public class Main

extends java.lang.Object

The main class for the RDL Compiler (RDLC for short). This takes care of reading the command line and calling the major packages of the compiler to do the actual work. The command line syntax is: `rdlc [commands] inputfile`
Commands include:

-help
  Prints out command line help for the program.
-inpath:"InputPath"
  Set the input path from which all files, including the RDL source file will be read.
-outpath:"OutputPath"
  Set the otuput path to which all files will be written, including the RDLC error log. Note that if no output path is set the errors will be printed to the console.
-author:"Author"
  Set the author name which is written into most output files.
-desc:"Description"
  Set the project description which is written into most output files.
-config:"Config.xml [replace]"
  Load the given xml file as the configuration file. Notice that if there are a many files, the later ones can add to the earlier ones as long as "replace" is false. Also to specify the default file replace "Config.xml" with a "-". The default is "- true".

Version:
  $Revision: 1.40 $
Author:
  Greg Gibeling

Nested Class Summary
`static class` | `Main.CommandInfo` Simple data structure to store information about a command or global option.
`protected class` | `Main.MainLoader` Contains all of the XML handling code needed to load the configuration file.
`static class` | `Main.OptionInfo` Simple data structure to store information about a command option.

Field Summary
`protected java.util.Hashtable<java.lang.String,java.lang.Class>` | `commandTable` Hash table of all the command classes loaded, keyed by name.
`(package private) boolean` | `gui` If the GUI loaded?
`protected Catalog<java.lang.String,Main.CommandInfo>` | `infoTable` Table of command information.
`protected java.lang.String` | `inputFile` The RDL input file.
`protected Catalog<java.lang.String,java.lang.String>` | `options` A catalog of the options.
`protected java.util.HashSet<java.lang.String>` | `optionTable` Set of all the valid options.
`static java.lang.String` | `version` Static version string

Constructor Summary
`Main(java.lang.String[] argv, java.util.List<java.io.InputStream> configFiles, boolean runCommands)` Main constructor, responsible for setting up all of the options and data structures for a run of RDLC.

Method Summary
`static java.util.List<java.lang.String>` | `array2List(java.lang.String[] array)` Convert an array of strings to a list of strings.
`protected void` | `displayHelp()` Display the command line help for RDLC.
`java.lang.Class` | `getCommandClass(java.lang.String name)` Get the class which implements the given command name.
`Catalog<java.lang.String,Main.CommandInfo>` | `getInfoTable()` Simple accessor.
`static void` | `main(java.lang.String[] argv)` This is the main RDLC entry point.
`boolean` | `runCommand(java.lang.String commandName, java.lang.String[] commandOptions)` Run the given command and return true if it succeedes.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### version

    public static final java.lang.String version

  Static version string

  See Also:
    Constant Field Values

### commandTable

    protected java.util.Hashtable<java.lang.String,java.lang.Class> commandTable

  Hash table of all the command classes loaded, keyed by name.

### optionTable

    protected java.util.HashSet<java.lang.String> optionTable

  Set of all the valid options.

### infoTable

    protected Catalog<java.lang.String,Main.CommandInfo> infoTable

  Table of command information.

### inputFile

    protected java.lang.String inputFile

  The RDL input file.

### options

    protected Catalog<java.lang.String,java.lang.String> options

  A catalog of the options.

### gui

    boolean gui

  If the GUI loaded?

Constructor Detail

### Main

    public Main(java.lang.String[] argv,
                java.util.List<java.io.InputStream> configFiles,
                boolean runCommands)

  Main constructor, responsible for setting up all of the options and data structures for a run of RDLC.

  Parameters:
    `argv` - The command line arguments.
    `configFiles` - A list of config files as input streams.
    `runCommands` - Run the commands from the command line.

Method Detail

### displayHelp

    protected void displayHelp()

  Display the command line help for RDLC.

### getCommandClass

    public java.lang.Class getCommandClass(java.lang.String name)

  Get the class which implements the given command name.

  Parameters:
    `name` - The name of the command.
  Returns:
    The class which implements it.

### runCommand

    public boolean runCommand(java.lang.String commandName,
                              java.lang.String[] commandOptions)

  Run the given command and return true if it succeedes.

  Parameters:
    `commandName` - The name of the command to run.
    `commandOptions` - An array of options for the command.
  Returns:
    `true` on success.

### getInfoTable

    public Catalog<java.lang.String,Main.CommandInfo> getInfoTable()

  Simple accessor.

  Returns:
    The catalog of command and option information.

### main

    public static void main(java.lang.String[] argv)

  This is the main RDLC entry point. It takes care of opening the appropriate files, parsing the command line, and then performing all the actions specified on it.

  Parameters:
    `argv` - The command line.

### array2List

    public static java.util.List<java.lang.String> array2List(java.lang.String[] array)

  Convert an array of strings to a list of strings.

  Parameters:
    `array` - The input array.
  Returns:
    A list containing the same strings.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD